import { getCarList } from "@/api/car/car";
export default {
  // 命名空间必写，防止模块之间互相影响
  namespaced: true,
  state: () => ({
    getCarList: [],
  }),
  mutations: {
    setCarList(state, data) {
      state.getCarList = data;
    },
  },
  actions: {
    async getCarList({ commit }, params) {
      const { avatar } = await getCarList(params);
      commit("setCarList", [avatar || []]);
      return Promise.resolve(avatar);
    },
  },
  getters: {},
};
